/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.ruan.designpatterns.structural.bridge;

/**
 *
 * @author Ruan
 */
public abstract class Vehicle {
    
    Engine engine;
    int weightInKilos;
    
    public abstract void drive();
    
    public void setEngine(Engine engine){
        this.engine = engine;
    }
    
    public String reportOnSpeed(int horsepower){
        
        int ratio = weightInKilos / horsepower;
        if(ratio < 3){
            return "fast";
        }
        else if((ratio >= 3) && (ratio < 8)){
            return "average";
        }
        else{
            return "slow";
        }
    }
}
